<?php if($this->message): ?>
    <h2><?php echo $this->message; ?></h2>
<?php else: ?>
    <div style="text-align: center; padding: 5px;">
    <div style="text-align: center; padding: 10px;">
        <?php 
            $src = $this->post->image_url;
            if(is_file($_SERVER['DOCUMENT_ROOT'] . '/images/post/' . $this->post->id . '.jpg')){
                $src = '/images/post/' . $this->post->id . '.jpg';
            }
        ?>
        <center><img id="post_img" style="max-height: 500px; max-width: 500px;" src="<?php echo $src;?>" /></center>
    </div>
    <table class="table">
        <tr>
            <td width="200">Рейтинг: </td>
            <td><?php echo $this->post->external_rating; ?></td>
        </tr>
        <?php if('' !== $this->post->external_votes): ?>
            <tr>
                <td>Голосов: </td>
                <td><?php echo $this->post->external_votes; ?></td>
            </tr>
        <?php endif; ?>
        <tr>
            <td>Пост был создан: </td>
            <td><?php echo $this->post->external_created_at; ?></td>
        </tr>
        <tr>
            <td>Добавлен в базу: </td>
            <td><?php echo $this->post->created_at; ?></td>
        </tr>
        <tr>
            <td>Тэги: </td>
            <td><?php echo $this->post->tag; ?></td>
        </tr>
        <tr>
            <td>Внешняя ссылка на пост (оригинал): </td>
            <td><a href="<?php echo $this->post->external_url; ?>" target="blank">Перейти</a></td>
        </tr>
        <? if($this->post->wall_url): ?>
        <tr>
            <td>Cсылка на пост (vk): </td>
            <td><a href="<?php echo $this->post->wall_url; ?>" target="blank">Перейти</a></td>
        </tr>
        <? endif; ?>
    </table>
<?php endif; ?>